# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kpeoplesink
pkgver=0_git20210224
pkgrel=1
_commit="6f382e619e22f9f34b0760fc19a23eb1863bf45b"
pkgdesc="Expose Sink contacts to KPeople"
url="https://invent.kde.org/pim/kpeoplesink"
# armhf blocked by qt5-qtdeclarative
# s390x and riscv64 blocked by signon-ui -> kaccounts-integration
# ppc64le blocked by kaccounts-integration
arch="all !armhf !s390x !riscv64 !ppc64le"
license="LGPL-2.1-or-later"
makedepends="
	extra-cmake-modules
	kaccounts-integration-dev
	kcontacts-dev
	kcoreaddons-dev
	kpeople-dev
	qt5-qtbase-dev
	samurai
	sink-dev
	"
source="https://invent.kde.org/pim/kpeoplesink/-/archive/$_commit/kpeoplesink-$_commit.tar.gz"
options="!check" # Broken tests
builddir="$srcdir/$pkgname-$_commit"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="04181dd34cb34b127a292b9294652adb82a3857b5a2de25ffaa27b13f971e6faa0abe1986e458a7a90298339ebbcdc10b1626d4ff2ff891baebf1ad1b45a1fe4  kpeoplesink-6f382e619e22f9f34b0760fc19a23eb1863bf45b.tar.gz"
